<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			ul{
				list-style-type: none;
				margin: 0;
				padding: 0;
			}
			li{
				display: inline-block;
				border: 1px solid #ccc;
				cursor: pointer;
				width: 50px;
				height: 50px;
				float: left;
				line-height: 50px;
				text-align: center;
				color: red;
				transition: 0.5s;
				border-right: none;
			}
			li:hover:not(.p1){
				background-color: #ccc;
				transition: 0.5s;
			}
			li:last-child{
				border-right: 1px solid #ccc;
			}
			
			.p1{
				background-color: #4CAF50;
				border: 1px solid #4CAF50 !important;
				color: white;
			}
		</style>
	</head>
	<body>
		<ul>
			<li><</li>
			<li class="p1">1</li>
			<li>2</li>
			<li>3</li>
			<li>4</li>
			<li>5</li>
			<li>6</li>
			<li>7</li>
			<li>></li>
		</ul>
	</body>
</html>